package com.dingreading.cloud.admin.service;

import com.dingreading.cloud.admin.entity.GoodsSuppliers;
import com.dingreading.cloud.admin.entity.WhPurchaseGoods;
import com.dingreading.cloud.common.util.PageUtil;
import com.mybatisflex.core.paginate.Page;
import com.mybatisflex.core.service.IService;

import java.util.List;

/**
 * 服务层。
 *
 * @author Administrator
 * @since 2023-11-22
 */
public interface GoodsSuppliersService extends IService<GoodsSuppliers> {

    Page<GoodsSuppliers> pageList(PageUtil pageUtil, Long suppliersId, Integer enabled);

    Page<WhPurchaseGoods> purchaseGoodsList(PageUtil pageUtil, String name, Long supplierId, Long categoryId, Integer enabled);

    long getDuplicate(Long suppliersId, Long goodsId, Long goodsTypeId);

    int dropData(Long id);

    void updateEnabled(Long id, Integer enabled);

    void updateEnabledBySupplierId(Long supplierId, Integer enabled);

    int dropDataBySupplierId(Long supplierId);

    boolean havesGoodsId(Long goodsId);

    boolean havesGoodsTypeId(Long goodsTypeId);

    List<GoodsSuppliers> getBySupplierIdAndGoodsTypeIdIn(Long supplierId, List<Long> goodsTypeIds);


}
